<?php


namespace app\api\controller;

use app\common\controller\BaseController;
use app\common\service\content\CategoryService;
use app\common\service\content\ContentService;
use app\common\service\setting\CarouselService;
use app\api\service\IndexService;
use hg\apidoc\annotation as Apidoc;
use think\facade\View;

/**
 * @Apidoc\Title("首页")
 * @Apidoc\Group("index")
 * @Apidoc\Sort("100")
 */
class About extends BaseController
{
    /**
     * @Apidoc\Title("首页")
     * @Apidoc\NotHeaders()
     * @Apidoc\NotQuerys()
     * @Apidoc\NotParams()
     */
    public function index()
    {
        $where = where_disdel();
        $where['category_pid'] = '1';
        $order = $this->order(['sort' => 'desc', 'category_id' => 'asc']);
        $field = 'category_id,category_pid,category_name,category_unique,image_id,small_image_id,url,sort';
        $list = CategoryService::list('tree', $where, $order, $field);
        View::assign('menuList', $list);
        dayin($list);
   
        View::assign('bannerUrl', 'https://www.pa0086.com/basic/images/about-banner.jpg');
        
        return view('index', $list);
    }
}
